/**
 * Notes: 宠物实体 - 宠物门店预约小程序
 * Date: 2025-01-27 
 */

const BaseModel = require('./base_model.js');
class PetModel extends BaseModel {}

// 集合名
PetModel.CL = "ax_pets";

PetModel.DB_STRUCTURE = {
	_pid: 'string|true',
	_id: 'string|true|comment=宠物唯一ID',
	userId: 'string|true|comment=所属用户ID',
	
	name: 'string|true|comment=宠物昵称',
	gender: 'string|true|comment=性别',
	category: 'string|true|comment=类别',
	weight: 'float|false|comment=体重(kg)',
	isSterilized: 'bool|true|default=false|comment=是否已绝育',
	species: 'string|false|comment=宠物品种',
	avatar: 'string|false|comment=宠物照片',
	birthday: 'int|false|comment=宠物生日',
	
	createTime: 'int|true|comment=创建时间',
	updateTime: 'int|true|comment=更新时间',
}

// 字段前缀
PetModel.FIELD_PREFIX = "";

// 禁用框架自动功能
PetModel.ADD_ID = false;
PetModel.UPDATE_TIME = false;
PetModel.UPDATE_IP = false;

/**
 * 宠物性别
 */
PetModel.GENDER = {
	MALE: '公',
	FEMALE: '母'
};

PetModel.GENDER_DESC = {
	MALE: '公',
	FEMALE: '母'
};

/**
 * 宠物类别
 */
PetModel.CATEGORY = {
	DOG: '狗狗',
	CAT: '猫猫'
};

PetModel.CATEGORY_DESC = {
	DOG: '狗狗',
	CAT: '猫猫'
};

module.exports = PetModel;
